<? 
	$id = $_GET['picture'];
	include '../libraries/open_db_connection.php';
	$sql="SELECT * FROM `gallery` WHERE `ID` = $id";
	$result = mysql_query($sql) or die("Cannot get picture info<BR>" . $sql);
	$image_details = mysql_fetch_assoc($result);
	$title = $image_details['title'];
	$audio_description=$image_details['audio_description'];
	$image = $image_details['image'];
	$image_thumbnail = $image_details['image_thumbnail'];
?>

<table width="750" cellpadding="0" cellspacing="1" class="admintable" >
  <tr>
	
<form action="gallery_admin.php?realm=<?echo $_GET ['realm'];?>&action=save" method="post" enctype="multipart/form-data">

  </tr>
  <tr>
  <td>Image title: </td><td><input type="text" name="title" value="<?echo $title;?>"></td>
  </tr>
  <tr>
  <td>Audio description for the picture:</td>
  <td><textarea name="audio_description" cols="60" rows="10"><?echo  $audio_description;?></textarea></td>
  </tr>
  <input type="hidden" name="picture" value="<?echo $id;?>"/>
    <td></td>
	<td class="admintd" colspan="10">
      <input type="submit" title="Submit" value="Submit"/>
    </td>
  </tr>
  </form>
  </table> 
  
  <img  src="../images/<?echo  $image_thumbnail;?>" alt="<?echo  $audio_description;?>" /> &nbsp;
  <img  src="../images/<?echo  $image;?>" alt="<?echo  $audio_description;?>" /><br>
  
  <? 
  	include '../libraries/close_db_connection.php';
  ?>
